<template>
	<view class="star">
		<view class="card">
			<view class="title">
				网约车从业资格考试在线模拟练习
			</view>
			<view class="form">
				<view class="form-item">
					<view class="label">考试名称</view>
					<view class="value">{{ name==0? `全国卷`:`${name}卷` }}</view>
				</view>
				<view class="form-item">
					<view class="label">考试时间</view>
					<view class="value">共40分钟</view>
				</view>
				<view class="form-item">
					<view class="label">考试规则</view>
					<view class="value">满分50分,40分及格</view>
				</view>
			</view>
		</view>

		<view class="btns">
			<view class="btn">
				<button class="cu-btn nxt-btn up-btn" @click="handBack">
					<text>返回练习</text>
				</button>
			</view>
			<view class="btn">
				<button class="cu-btn nxt-btn down-btn" @click="handStar">
					<text>开始考试</text>
				</button>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		doMockeExam
	} from '@/api/examination.js'
	export default {
		data() {
			return {
				name: '',
				id: ''
			}
		},
		onLoad(e) {
			this.name = e.name
			this.id = e.id
		},
		methods: {
			handBack() {
				uni.navigateBack()
			},
			handStar() {
				uni.navigateTo({
					url: `/pages/examination/examination?id=${this.id}&name=${this.name}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.title {
		font-size: 45rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #2D3341;
		padding: 153rpx 172rpx 0 172rpx;
		text-align: center;
		line-height: 80rpx;
	}

	.card {
		width: 702rpx;
		background-color: #FFFFFF;
		border-radius: 24rpx;
		margin: 0 auto;
		padding-bottom: 120rpx;
	}

	.form {
		padding: 120rpx 71rpx 0 71rpx;

		&-item {
			display: flex;
			align-items: center;
			border-bottom: 1px solid #EBECF0;
			padding: 40rpx 0 20rpx 0;

			.label {
				color: #333;
				font-weight: bold;
				font-size: 30rpx;
			}

			.value {
				margin-left: 20rpx;
				font-size: 30rpx;
			}
		}
	}

	.btns {
		margin-top: 100rpx;
		display: flex;
		justify-content: space-between;
		margin-top: 40rpx;
		padding: 0 60rpx;
	}

	.btn {
		.nxt-btn {
			width: 300rpx;
			height: 88rpx; 
			background: #E3E3E3;
			border-radius: 20rpx;
			font-size: 32rpx; 
			font-family: PingFang SC-Regular, PingFang SC;
			font-weight: 400;
			color: #FFFFFF;
		}

		.up-btn {
			background-color: #0683FF;
		}

		.down-btn {
			background-color: #36c269;
		}
	}
</style>